home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
176-200
/
disk_190
/
garyicons
/
library
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1992-05-06
|
1KB
|
63 lines
REM - This demo program shows how to
REM - invoke Amiga library routines
REM - from Amiga-BASIC
DECLARE FUNCTION AskSoftStyle& LIBRARY
DECLARE FUNCTION OpenFont& LIBRARY
DECLARE FUNCTION Execute& LIBRARY
LIBRARY "graphics.library"
enable%=AskSoftStyle&(WINDOW(8))
Font "topaz.font",8,0,0
FOR i=0 TO 4
SetStyle CINT(2^i)
NEXT i
Font "topaz.font",9,0,0
enable%=AskSoftStyle&(WINDOW(8))
FOR i=0 TO 4
SetStyle CINT(2^i)
NEXT i
SetStyle 0
Font "",0,0,0 'Causes last pFont to be closed
REM --- The next line only works
REM --- under CLI, not WorkBench
' DosLibDemo
LIBRARY CLOSE
END
SUB Font(fontName$, height%, style%, prefs%) STATIC
SHARED pFont&
IF pFont&<>0 THEN CALL CloseFont(pFont&)
fontName0$=fontName$+CHR$(0)
textAttr&(0)=SADD(fontName0$)
textAttr&(1)=height%*65536 + style%*256 + prefs%
pFont&=OpenFont&(VARPTR(textAttr&(0)))
IF pFont& <> 0 THEN SetFont WINDOW(8),pFont&
END SUB
SUB SetStyle(mask%) STATIC
SHARED enable%
SetSoftStyle WINDOW(8),mask%,enable%
PRINT "SetSoftStyle(";mask%;")"
END SUB
SUB DosLibDemo STATIC
LIBRARY "dos.library"
'this invokes the dos.library Execute function
x=Execute&(SADD("list >RAM:temp"+CHR$(0)), 0, 0)
OPEN "RAM:temp" FOR INPUT AS 1
WHILE NOT EOF(1)
LINE INPUT #1,a$
PRINT a$
WEND
CLOSE
KILL "RAM:temp"
END SUB